# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月18日
"""
import openpyxl

myBook = openpyxl.load_workbook('收入表.xlsx')
mySheet = myBook.worksheets[0]
myRowIndex = 0

for myRow in mySheet['B5':'D8']:
	myRowSum = 0
	myRowIndex += 1
	for myCell in myRow:
		myRowSum += myCell.value
	mySheet.cell(myRowIndex + 4, 5).value = myRowSum

myBook.save('收入表.xlsx')
